#import <Foundation/Foundation.h>
#import "UserInfo.h"
#import "IMManager.h"
#import "UserToken.h"
typedef NS_ENUM(NSInteger, UserLoginType){
    kUserLoginTypeUnKnow = 0,
    kUserLoginTypeWeChat,
    kUserLoginTypeQQ,
    kUserLoginTypePwd,
    OmUserLoginTypeNormal,
    OmUserLoginTypeRegister
};
typedef void (^loginBlock)(BOOL success, NSString * des);
#define isLogin [UserManager sharedUserManager].isLogined
#define curUser [UserManager sharedUserManager].curUserInfo
#define userManager [UserManager sharedUserManager]
@interface UserManager : NSObject
SINGLETON_FOR_HEADER(UserManager)
@property (nonatomic, strong) UserInfo *curUserInfo;
@property(nonatomic, strong) UserToken *token;
@property (nonatomic, assign) UserLoginType loginType;
@property (nonatomic, assign) BOOL isLogined;
#pragma mark - ——————— 登录相关 ————————
-(void)login:(UserLoginType )loginType completion:(loginBlock)completion;
-(void)login:(UserLoginType )loginType params:(NSDictionary *)params completion:(loginBlock)completion;
-(void)autoLoginToServer:(loginBlock)completion;
- (void)logout:(loginBlock)completion;
-(BOOL)loadUserInfo;
-(void)saveUserInfo;
-(void)initConfig;
-(void)LoginSuccess:(id )responseObject completion:(loginBlock)completion;
@end
